# -*- coding: utf-8 -*-

"""
@author: Laowang
@contact: QQ:1125564921
@Created on: 2022/6/21
@Remark: 
"""

from framework_strategy.gopy.gateways.cache import overloadcls
from framework_strategy.gopy.gateways.settings import XT4FUTUREAPIUMSETTING
# XT 平台


@overloadcls
class XT4FutureConfig:

    Domain = {
        "pro": XT4FUTUREAPIUMSETTING.API_DOMAIN_PRO,
        "dev": XT4FUTUREAPIUMSETTING.API_DOMAIN_DEV,
        "test": XT4FUTUREAPIUMSETTING.API_DOMAIN_TEST,
    }

    # Get timestamp from server
    GET_SERVER = ''

    # Get trade account type
    GET_ACCOUNT = ''

    # Get trade config from market
    GET_MARKET_CONFIG = '/future/market/v1/public/symbol/list' # 1

    # Get Kline
    GET_KLINE = '/future/market/v1/public/q/kline' # 1

    # Access to 24 hours of trading
    GET_TICKER = '/future/market/v1/public/q/agg-ticker' # 1 TODO binance

    # Obtain all trading quotations within 24 hours
    GET_TICKERS = '/future/market/v1/public/q/agg-tickers' # 1 TODO binance

    # Get the latest trading depth
    GET_DEPTH = '/future/market/v1/public/q/depth' # 1 

    # Get the latest transaction data
    GET_TRADES = '/future/market/v1/public/q/deal' # 1

    # Get balance of account
    GET_BALANCE = '/future/user/v1/balance/list' # 

    # Gets the specified account assets
    GET_FUNDS = '/future/user/v1/balance/detail'

    # Place a order and Commissioned order
    SEND_ORDER = '/future/trade/v1/order/create' # 1

    # Batch order
    BATCH_ORDER = '/future/trade/v1/order/create-batch' # 

    # Cancel order
    CANCEL_ORDER = '/future/trade/v1/order/cancel' # 1

    # Batch cancel
    BATCH_CANCEL = '/future/trade/v1/order/cancel-all'

    # OrderLine
    GET_ORDER = '/future/trade/v1/order/detail' # 1 orderStatus

    # Obtain outstanding orders
    GET_OPEN_ORDERS = '/future/trade/v1/order/list' # 1 orderbook

    # Get multiple order information
    GET_BATCH_ORDERS = '/trade/api/v1/getBatchOrders'

    # Get myTrades
    GET_ACCOUNT_TRADES = "/trade/api/v1/myTrades"

    # OPEN-ACCOUNT
    OPEN_ACCOUNT_FUTURE = "/future/user/v1/account/open"

    # GET_ACCOUNT_INFO
    GET_ACCOUNT_INFO = "/future/user/v1/account/info"
